<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="AssetUserSum.aspx.vb" Inherits="AssetUserSum" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"  >
        <ContentTemplate>
            <asp:HiddenField ID="hiUID" runat="server" />
            <asp:HiddenField ID="hiDBName" runat="server" />
            <asp:ObjectDataSource ID="dbAssetUseSum" runat="server" SelectMethod="getUserAssetSum"
                TypeName="AssetManage.BBL.AssetBBL">
                <SelectParameters>
                    <asp:ControlParameter ControlID="txtDept" Name="deptno" PropertyName="Text"
                        Type="String" />
                    <asp:ControlParameter ControlID="txtasset_owner" Name="asset_owner" PropertyName="Text"
                        Type="String" />
                    <asp:ControlParameter ControlID="ddlAssetDef" Name="asset_defid" 
                        PropertyName="SelectedValue" Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="dbAssetDef" runat="server" SelectMethod="GetAssetType"
                TypeName="AssetManage.BBL.AssetBBL">
                <SelectParameters>
                    <asp:Parameter DefaultValue="1" Name="kind" Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" DefaultValue="" Name="dbName" PropertyName="Value"
                        Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <table>
                <tr>
                    <td style="text-align: center">
                        <asp:Label ID="lblTitle" runat="server" Font-Bold="True" Font-Size="24px" meta:resourcekey="lblTitle"></asp:Label>
                    </td>
                </tr>
                <tr style="vertical-align: text-top">
                    <td>
                        <table border="1" width="900px">
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblDept" runat="server" meta:resourcekey="lblDept"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDept" runat="server" Width="80px"></asp:TextBox>
                                </td>
                                <td align="right">
                                    <asp:Label ID="lblAssetType" runat="server" meta:resourcekey="lblAssetType"></asp:Label>
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlAssetDef" runat="server" DataSourceID="dbAssetDef" DataTextField="name"
                                        DataValueField="id" Width="120px">
                                    </asp:DropDownList>
                                </td>
                                <td align="right">
                                    <asp:Label ID="lblasset_owner" runat="server" meta:resourcekey="lblasset_owner"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtasset_owner" runat="server" Width="80px"></asp:TextBox>
                                </td>
                                <tr>
                                    <td align="center" colspan="6">
                                        &nbsp;<asp:LinkButton ID="btnQuery" runat="server" meta:resourcekey="btnQuery"></asp:LinkButton>&nbsp;
                                        <asp:LinkButton ID="btnExcel" runat="server" meta:resourcekey="btnExport"></asp:LinkButton>
                                        <asp:Label ID="lblExportKind" runat="server" meta:resourcekey="lblExportKind" Visible="False"></asp:Label>
                                        <asp:DropDownList ID="ddlExportKind" runat="server" Visible="False">
                                            <asp:ListItem>Excel</asp:ListItem>
                                            <asp:ListItem>CALC</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="6">
                                        <TServerControl:TGridView ID="gvMain" runat="server" AllowHoverEffect="False" AllowHoverSelect="False"
                                            AllowPaging="True" ShowFooterWhenEmpty="False" ShowHeaderWhenEmpty="True"
                                            SkinID="pager" TotalRowCount="0" Width="900px" 
                                            DataSourceID="dbAssetUseSum" PageSize ="100"
                                            Visible="False">
                                        
                                            <EmptyDataTemplate>
                                                <asp:Label ID="lblEmpty" runat="server" ForeColor="Red" meta:resourcekey="lblEmpty"></asp:Label>
                                            </EmptyDataTemplate>
                                        </TServerControl:TGridView>
                                        </td>
                                </tr>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
